package com.learn.training.multithread.chapter6.minchapter8.demo1;

public class Demo {
    public static void main(String[] args) throws InterruptedException {
        AccessLimitControl accessLimitControl = new AccessLimitControl();
        for (int i = 0; i < 10; i++) {
            Thread t = new Thread(() -> {
                try {
                    accessLimitControl.access("test");
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            });
            t.start();
        }
    }
}
